#pragma once

#include <iostream>
#include <string>
#include <vector>
#include <fstream>
#include <boost/algorithm/string.hpp>
#include "include/Jieba.hpp"

const char* const DICT_PATH = "./dict/jieba.dict.utf8";
const char* const HMM_PATH = "./dict/hmm_model.utf8";
const char* const USER_DICT_PATH = "./dict/user.dict.utf8";
const char* const IDF_PATH = "./dict/idf.utf8";
const char* const STOP_WORD_PATH = "./dict/stop_words.utf8";


namespace ns_util
{
    class Split
    {
    public:
        static void TextSplit(std::string scr_text, std::vector<std::string>& result)
        {
            boost::split(result, scr_text, boost::is_any_of("\3"), boost::token_compress_on);
        }
    };

    class Cut
    {
    public:
        static cppjieba::Jieba jieba;
        static void CutText(const std::string& scr_text, std::vector<std::string>& result)
        {
            jieba.CutForSearch(scr_text, result);
        }
    };
    cppjieba::Jieba Cut::jieba(DICT_PATH, HMM_PATH, USER_DICT_PATH, IDF_PATH, STOP_WORD_PATH);

}